﻿using DFGK_WMS.Model.Dto.YS;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IMaterialService
    {
        /// <summary>
        /// 添加物料
        /// </summary>
        /// <param name="m"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool AddMaterial(Material m, out string message);
        bool Addmateriallist(List<FengRenMaterialDataDTO> m);
        

        /// <summary>
        /// 物料列表显示
        /// </summary>
        /// <param name="mname"></param>
        /// <param name="materialcategoryid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<Material> GetMaterialList(string? mname, int materialcategoryid, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 删除物料
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        bool DelMaterial(long mid);

        /// <summary>
        /// 修改物料
        /// </summary>
        /// <param name="m"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool UpdMaterial(Material m,out string message);

        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        Material? GetMaterialById(long mid);

        /// <summary>
        /// 获取全部
        /// </summary>
        /// <returns></returns>
        List<Material> GetAllMaterialList();

        /// <summary>
        /// 批量添加物料
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        bool AddMaterialList(List<Material> list,out string message);

    }
}
